package com.lyl.xxx.modules.web.account.model.dto;

import com.lyl.common.validation.annotation.ListValue;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author Mr.Luo
 * @date 2022-09-29 15:19
 * @desc
 */
@Data
public class MenuDTO {

    private Long menuId;

    /**
     * 父级菜单id
     */
    @NotNull
    private Long parentId;

    /**
     * 菜单名称
     */
    @NotBlank(message = "菜单名称不能为空")
    @Length(min = 1, max = 20, message = "菜单名称在1到20个字符")
    private String menuName;

    /**
     * icon
     */
    private String icon;

    /**
     * 组件路径
     */
    @NotBlank(message = "路由地址不能为空")
    private String path;

    /**
     * 排序
     */
    @NotNull
    private Integer orderNum;

    /**
     * 显示状态
     */
    @NotNull(message = "显示状态不能为空")
    private Boolean visible;

    /**
     * 状态
     */
    private Boolean status;

    @ListValue({"M", "C", "F"})
    private String menuType;

    @NotNull
    private Boolean isIframe;

    @NotNull
    private Integer level;

    private String component;

    private String query;

    private String perms;
}
